#!/bin/bash
source ./context.sh
svn update  --username $comCysyzSvnUserName --password $comCysyzSvnPassword
mvn clean package -U -Dmaven.test.skip=true -Denvironment.type=test
echo "Stop $comCysyzTomcatHome"
./tomcatd.sh stop
echo "Sleep 5s"
sleep 5
echo "Delete $comCysyzTomcatAppName folder in $comCysyzTomcatHomeAppsPath"
rm -Rf ${comCysyzTomcatAppWarPath} ${comCysyzTomcatAppPath}
echo "Copy ${comCysyzProjectPath}.war to ${comCysyzTomcatAppWarPath}"
cp -f ${comCysyzProjectPath}.war ${comCysyzTomcatAppWarPath}
echo "Start Tomcat"
./tomcatd.sh start